package com.neegix.system.user.application.assembler;

import com.neegix.system.user.application.dto.UserDTO;
import com.neegix.system.user.interfaces.vo.UserVO;
import com.neegix.system.user.domain.entity.UserEntity;
import com.neegix.system.user.interfaces.form.NewUserForm;
import com.neegix.system.user.interfaces.form.QueryUserForm;
import com.neegix.system.user.interfaces.form.UpdateUserForm;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import java.util.List;

 /**
  * This file is auto-generated by nebula-framework-generator.
  * The auto-generation plugin was developed using IntelliJ IDEA Community Edition.
  * Thanks to JetBrains for their outstanding contributions to the developer community.
  * <p>
  * The code generated by this tool is owned by the user of the tool.
  * The tool itself is copyrighted by <a href="https://www.neegix.com">https://www.neegix.com</a>.
  *
  * @author <a href="https://www.neegix.com">https://www.neegix.com</a>
  * @version 1.0.0
  * @since 2024-12-03 11:47:28
  */

@Mapper
public interface UserAssembler {
    UserAssembler INSTANCE = Mappers.getMapper(UserAssembler.class);


    @Mapping(target = "id", ignore = true)
    @Mapping(target = "createTime", ignore = true)
    @Mapping(target = "updateTime", ignore = true)
    @Mapping(target = "createUser", ignore = true)
    @Mapping(target = "updateUser", ignore = true)
    UserEntity covertEntity(NewUserForm newUserForm);

    @Mapping(target = "createTime", ignore = true)
    @Mapping(target = "updateTime", ignore = true)
    @Mapping(target = "createUser", ignore = true)
    @Mapping(target = "updateUser", ignore = true)
    UserEntity covertEntity(UpdateUserForm updateUserForm);

    @Mapping(target = "createTime", ignore = true)
    @Mapping(target = "updateTime", ignore = true)
    UserDTO covertDTO(QueryUserForm queryUserForm);

    List<UserVO> covertVO(List<UserDTO> UserDTOs);

    UserVO covertVO(UserDTO queryUserDTO);
}